package com.hsl;

import com.hsl.test.chickenSoup.ContentUtil;
import com.hsl.network.ui.MyWindow;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationDisplayType;
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.ui.MessageType;

public class MyPlugls extends AnAction {

    @Override
    public void actionPerformed(AnActionEvent event) {

        NotificationGroup notificationGroup = new NotificationGroup("testid", NotificationDisplayType.BALLOON, false);
        /**
         * content :  通知内容
         * type  ：通知的类型，warning,info,error
         */
        Notification notification = notificationGroup.createNotification(ContentUtil.getContent(), MessageType.INFO);
        Notifications.Bus.notify(notification);

        MyWindow frame = new MyWindow();
        frame.pack();
        frame.setLocationRelativeTo(null);

    }
}
